// Validate ADD form - emails
var v = new Validator('emails-add-form'); v.EnableMsgsTogether();

v.addValidation('emails[email_code]', 'required', 'Email Code - please enter data');
v.addValidation('emails[email_subject]', 'required', 'Email Subject - please enter data');
v.addValidation('emails[email_html]', 'required', 'Email HTML - please enter data');
v.addValidation('emails[email_text]', 'required', 'Email Text - please enter data');

/**
* Extra validations - like Agreement
*/
function agreement()
{
	var success = false;
		// checked
		success = true;

	return(success);
}
//v.setAddnlValidationFunction(agreement);

// If jQuery validator is used
// $(document).ready(function(){ $("#emails-add-form").validate(); });